/**********************************************
这是代码自动生成的，如果重新生成，所做的改动将会丢失
系统:gpssolution
模块:系统平台
Itop.com 版权所有
生成者：Rabbit
生成时间:2012-8-1 10:14:11
***********************************************/

using System;
using System.Threading;
using System.ComponentModel;
namespace Itop.GpsCar.Model
{
    /// <summary>
    ///[alarmevent]业务实体类
    ///对应表名:alarmevent
    /// </summary>
    [Serializable]
    public class alarmevent
    {
        
        #region Private 成员
        private int _idalarmevent=0; 
        private int _alarm_id=0; 
        private int _device_id=0; 
        private DateTime _alarm_date=new DateTime(1900,1,1); 
        private string _alarm_time=String.Empty; 
        private int _alarm_event_status=0; 
        private int _alarm_event_processed_by=0; 
        private string _alarm_event_info=String.Empty; 
        private DateTime _timestamp=new DateTime(1900,1,1); 
        private string _reserved_1=String.Empty; 
        private string _reserved_2=String.Empty;   
        #endregion
  
  
        #region Public 成员
   
        /// <summary>
        /// 属性名称：idAlarmEvent
        /// 属性描述：
        /// 字段信息：[idAlarmEvent],INT UNSIGNED
        /// </summary>
        [Browsable(false)]
        [DisplayNameAttribute("")]
        public int idAlarmEvent
        {
            get { return _idalarmevent; }
            set
            {			
                if (_idalarmevent as object == null || !_idalarmevent.Equals(value))
                {
                    _idalarmevent = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：Alarm_id
        /// 属性描述：
        /// 字段信息：[Alarm_id],INT UNSIGNED
        /// </summary>
        [DisplayNameAttribute("")]
        public int Alarm_id
        {
            get { return _alarm_id; }
            set
            {			
                if (_alarm_id as object == null || !_alarm_id.Equals(value))
                {
                    _alarm_id = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：Device_id
        /// 属性描述：
        /// 字段信息：[Device_id],INT UNSIGNED
        /// </summary>
        [DisplayNameAttribute("")]
        public int Device_id
        {
            get { return _device_id; }
            set
            {			
                if (_device_id as object == null || !_device_id.Equals(value))
                {
                    _device_id = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：Alarm_date
        /// 属性描述：The date of alarm has been triggered
        /// 字段信息：[Alarm_date],DATE
        /// </summary>
        [DisplayNameAttribute("The date of alarm has been triggered")]
        public DateTime Alarm_date
        {
            get { return _alarm_date; }
            set
            {			
                if (_alarm_date as object == null || !_alarm_date.Equals(value))
                {
                    _alarm_date = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：Alarm_time
        /// 属性描述：The time of alarm has been triggered
        /// 字段信息：[Alarm_time],TIME
        /// </summary>
        [DisplayNameAttribute("The time of alarm has been triggered")]
        public string Alarm_time
        {
            get { return _alarm_time; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 0)
                throw new Exception("[The time of alarm has been triggered]长度不能大于0!");
                if (_alarm_time as object == null || !_alarm_time.Equals(value))
                {
                    _alarm_time = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：Alarm_event_status
        /// 属性描述：status of alarm, 1 - Just trigger, 2- processed
        /// 字段信息：[Alarm_event_status],INT
        /// </summary>
        [DisplayNameAttribute("status of alarm")]
        public int Alarm_event_status
        {
            get { return _alarm_event_status; }
            set
            {			
                if (_alarm_event_status as object == null || !_alarm_event_status.Equals(value))
                {
                    _alarm_event_status = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：Alarm_event_processed_by
        /// 属性描述：indicated who processed this alarm
        /// 字段信息：[Alarm_event_processed_by],INT
        /// </summary>
        [DisplayNameAttribute("indicated who processed this alarm")]
        public int Alarm_event_processed_by
        {
            get { return _alarm_event_processed_by; }
            set
            {			
                if (_alarm_event_processed_by as object == null || !_alarm_event_processed_by.Equals(value))
                {
                    _alarm_event_processed_by = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：Alarm_event_info
        /// 属性描述：
        /// 字段信息：[Alarm_event_info],TEXT
        /// </summary>
        [DisplayNameAttribute("")]
        public string Alarm_event_info
        {
            get { return _alarm_event_info; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 0)
                throw new Exception("[]长度不能大于0!");
                if (_alarm_event_info as object == null || !_alarm_event_info.Equals(value))
                {
                    _alarm_event_info = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：timestamp
        /// 属性描述：
        /// 字段信息：[timestamp],TIMESTAMP
        /// </summary>
        [DisplayNameAttribute("")]
        public DateTime timestamp
        {
            get { return _timestamp; }
            set
            {			
                if (_timestamp as object == null || !_timestamp.Equals(value))
                {
                    _timestamp = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：reserved_1
        /// 属性描述：
        /// 字段信息：[reserved_1],VARCHAR
        /// </summary>
        [DisplayNameAttribute("")]
        public string reserved_1
        {
            get { return _reserved_1; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 45)
                throw new Exception("[]长度不能大于45!");
                if (_reserved_1 as object == null || !_reserved_1.Equals(value))
                {
                    _reserved_1 = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：reserved_2
        /// 属性描述：
        /// 字段信息：[reserved_2],VARCHAR
        /// </summary>
        [DisplayNameAttribute("")]
        public string reserved_2
        {
            get { return _reserved_2; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 45)
                throw new Exception("[]长度不能大于45!");
                if (_reserved_2 as object == null || !_reserved_2.Equals(value))
                {
                    _reserved_2 = value;
                }
            }			 
        }
  
        #endregion 
  
        #region 方法
        public static string Newid(){
            return DateTime.Now.ToString("yyyyMMddHHmmssffffff");
        }
        public string CreateID(){
            Thread.Sleep(new TimeSpan(100000));//0.1毫秒
            return DateTime.Now.ToString("yyyyMMddHHmmssffffff");
        }
        #endregion		
    }	
}
